import { useBoolean } from '@lynn/react-hooks'
import React from 'react'

export default function UseBoolean() {
    const [value, set, toggle] = useBoolean()

    return (
        <>
            <div>{value ? 'true' : 'false'}</div>
            <button onClick={toggle}>取反</button>
            <button onClick={() => set(true)}>设置为true</button>
        </>
    )
}
